package com.demo.order.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.alibaba.csp.sentinel.slots.block.flow.FlowException;
import com.demo.account.api.AccountApi;
import com.demo.account.model.AccountVO;
import com.demo.order.service.IOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wuyijie
 * @className: TestController
 * @description: TODO
 * @date 2021/3/30 14:42
 */
@RestController
@RequestMapping("/test")
@Api(value = "testcontroller of orderservice")
@Slf4j
public class TestController {
    @Autowired
    private IOrderService orderService;

    @RequestMapping(value = "test1",method = RequestMethod.GET)
    public AccountVO test1(@RequestParam("id") int id){
        return orderService.test1(id);
    }

    @RequestMapping(value = "test2",method = RequestMethod.GET)
    public AccountVO test2(@RequestParam("id") int id){
        return orderService.test2(id);
    }


    @RequestMapping(value = "test3",method = RequestMethod.GET)
    public AccountVO test3(@RequestParam("id") int id){
        return orderService.test1(id);
    }


}
